import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { TimeStatisticsQuery, TimeStatisticsPageResult } from "./types";

/**
 * 获取码分页数据
 *
 * @param queryParams
 */
export function getTimeStatisticsPage(
  queryParams?: TimeStatisticsQuery
): AxiosPromise<TimeStatisticsPageResult> {
  return request({
    url: "api/Order/Hour",
    method: "post",
    // params: queryParams,
  });
}

/**
 * 获取码下拉数据
 *
 * @param queryParams
 */
export function getTimeStatisticsOptions(
  queryParams?: TimeStatisticsQuery
): AxiosPromise<OptionType[]> {
  return request({
    url: "/api/v1/roles/options",
    method: "get",
    params: queryParams,
  });
}
